<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/select2/select2.js" type="text/javascript"></script>
<style type='text/css'>
    #reserve_start_time{height:24px;border:solid 1px #c5c5c5;background:url(http://img1.isou365.cn/paimai/yunying/images/time_pic.jpg) no-repeat 120px 5px; cursor:pointer;}
    #reserve_end_time{height:24px;border:solid 1px #c5c5c5;background:url(http://img1.isou365.cn/paimai/yunying/images/time_pic.jpg) no-repeat 120px 5px;cursor:pointer;}
    .table tbody tr td a:link{color:#20ab4f;text-decoration: underline;}
    .table tbody tr td a:visited{text-decoration: underline;color:#303030;}
    .table tbody tr td a:hover{text-decoration: underline;color:#20ab4f;}
    .table tbody tr td a:active{color:#f99d0c;text-decoration: underline;}
    .table tbody tr td a.not-point{color:#9f9f9f; text-decoration: none;}
    .search6{display: block;clear: left;padding-top: 10px;}
    .search6-input{ margin-left: 0!important;}
</style>
</head>
<include file="Public/common_header" />
<div class="mian">
<include file="Public/sidebar"  menu="clcwht.nrrbfb" />
    <div class="mianR">
        <div class="yuList" >
        	<form id="searchFrom">
            <div class="yuSuo clearfix">
                <div id="search1">
                    <input type="text" id="article_title" name="article_title" placeholder="请输入标题关键字" value="">
                    <input type="text" id="nick_name" name="nick_name" placeholder="请输入牛人昵称" value="">
                    <select id="attribute" name="attribute" class="branch_company">
                        <option value="">请选择资讯类型</option>
                        <option value="1">图文</option>
                        <option value="2">视频</option>
                    </select>
                    <select id="is_top" name="attribute" class="branch_company">
                        <option value="">请选择是否推荐</option>
                        <option value="1">是</option>
                        <option value="2">否</option>
                    </select>
                    <select id="status" name="status" class="branch_company">
                        <option value="">状态</option>
                        <option value="0">已下线</option>
                        <option value="1">已上线</option>
                        <option value="2">待发布</option>
                    </select>
                    <select id="sort" name="sort" class="branch_company">
                        <option value="">默认排序</option>
                        <option value="pv-desc">PV从高到低</option>
                        <option value="uv-desc">UV从高到低</option>
                        <option value="comment-desc">评论数从高到低</option>
                        <option value="pv-asc">PV从低到高</option>
                        <option value="uv-asc">UV从低到高</option>
                        <option value="comment-asc">评论数从低到高</option>
                    </select>
                </div>
                <div id="search2" style="margin-top: 10px;clear: both;">
                    <input type="text" id="start_time" name="start_time" value="" readonly placeholder="发布时间起"/><em></em>
                    <input type="text" id="end_time" name="end_time" value="" readonly placeholder="发布时间止" style="margin-right: 10px;"/>
                    <input type="button" onclick="searchList();" id="search" value="搜索" class="suoSou">
                    <input type="button" onclick="window.location.href='/Article/expertAdd';" class="suoSou" value="新增日报" />
                </div>
            </div>

            </form>
        </div>
      <div class="listBox" id="listBox">

      </div>
   </div>
    <div class="clear"></div>
    <include file="Public/foot" />
<script type="text/javascript">
    get_list();
    var page = 1;

    $("#start_time").ymdateplugin({
        changeMonth: true,
        changeYear: true
    });
    $("#end_time").ymdateplugin({
        changeMonth: true,
        changeYear: true
    });

    function get_list(params){
        var url = get_url();
        
        $.get("/article/expertArticleList",params, function(data){
            $("#listBox").html(data);
        },"html");
    }

//    function get_page(p){
//    	var url = get_url();
//
//        url += "&p=" + p;
//        $.get("/Article/expertArticleList",url,function(data){
//            $("#listBox").html(data);
//        },"html");
//    }
    function get_page(p) {
        page = p;
        searchList();
    }

    function searchList(){
    	var params = {};
        params.p = page;
        var is_top = $('#is_top').val();
        if(is_top){
            params.is_top = is_top;
        }
        var attribute = $('#attribute').val();
        if(attribute){
            params.attribute = attribute;
        }
        var article_title = $('#article_title').val();
        if(article_title){
            params.article_title = article_title;
        }
        var nick_name = $('#nick_name').val();
        if(nick_name){
            params.nick_name = nick_name;
        }
    	var status = $('#status').val();
    	if(status){
    		params.status = status;
    	}
    	var sort = $('#sort').val();
        if (sort){
            params.sort = sort;
        }
        var start_time = $('#start_time').val();
        if (start_time) {
            params.start_time = start_time;
        }
        var end_time = $('#end_time').val();
        if (end_time) {
            params.end_time = end_time;
        }
    	
    	get_list(params);
    	
    }
    

    function get_url(){
        var url = "";
        return url;
    }


</script>